package com.aaa.service.impl;

import com.aaa.entity.Playlist;
import com.aaa.mapper.TuiJianPlayListMapper;
import com.aaa.service.TuiJianPlayListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional
public class TuiJianPlayListServiceImpl implements TuiJianPlayListService {
    @Resource
    private TuiJianPlayListMapper tuiJianPlayListMapper;
    /**
     * 根据热度进行倒叙排列，列出前几条热度Pcolt最高的歌单
     * @param keyword
     * @return
     */
    @Override
    public List<Playlist> listAllPcolt(String keyword) {
        return tuiJianPlayListMapper.listAllPcolt(keyword);
    }
    /**
     * 查询正常的，不按照热度进行排序
     * @param keyword
     * @return
     */
    @Override
    public List<Playlist> listAll(String keyword) {
        return tuiJianPlayListMapper.listAll(keyword);
    }
}
